using IStrong.EC.Abstractions.Interfaces;
using System;
using System.Collections.Generic;
using System.Text;

namespace IStrong.EC.WebApi.Results.Entity
{
    /// <summary> 
    /// 服务合同基础信息
    /// </summary> 
    public class MaintenanceContracts
    {
        /// <summary> 
        /// ID
        /// </summary> 
        public int Id { get; set; }

        /// <summary> 
        /// 省份
        /// </summary> 
        public string Province { get; set; }

        /// <summary> 
        /// 市
        /// </summary> 
        public string City { get; set; }

        /// <summary> 
        /// 县
        /// </summary> 
        public string County { get; set; }

        /// <summary> 
        /// 客户名称
        /// </summary> 
        public string CustomerName { get; set; }

        /// <summary> 
        /// 客户单位
        /// </summary> 
        public string CustomerUnit { get; set; }

        /// <summary> 
        /// 合同编号
        /// </summary> 
        public string ContractId { get; set; }
        /// <summary> 
        /// 新合同编号
        /// </summary> 
        public string NewContractId { get; set; }

        /// <summary> 
        /// 合同名称
        /// </summary> 
        public string ContractName { get; set; }

        /// <summary> 
        /// 合同金额
        /// </summary> 
        public decimal? ContractAmount { get; set; }

        /// <summary> 
        /// 责任区域
        /// </summary> 
        public string Territory { get; set; }

        /// <summary> 
        /// 推进状态
        /// </summary> 
        public string AdvancingState { get; set; }

        /// <summary> 
        /// 合同类型
        /// </summary> 
        public string ContractType { get; set; }

        /// <summary> 
        /// 合同方向
        /// </summary> 
        public string ContractDirection { get; set; }

        /// <summary> 
        /// 预算
        /// </summary> 
        public Boolean IsBudget { get; set; }

        /// <summary> 
        /// 预算金额
        /// </summary> 
        public decimal BudgetAmount { get; set; }

        /// <summary> 
        /// 预估金额
        /// </summary> 
        public decimal EstimatedAmount { get; set; }

        /// <summary> 
        /// 项目成熟度
        /// </summary> 
        public string ProjectMaturity { get; set; }

        /// <summary> 
        /// 签订金额
        /// </summary> 
        public decimal SignAmount { get; set; }

        /// <summary> 
        /// 项目跟踪等级
        /// </summary> 
        public string ProjectLevel { get; set; }

        /// <summary> 
        /// 计划签订日期
        /// </summary> 
        private DateTime _ContractDate { get; set; }
        /// <summary>
        /// 计划签订日期
        /// </summary>
        public string ContractDate
        {
            get
            {
                if (null != _ContractDate) return _ContractDate.ToString("yyyy-MM-dd");
                return string.Empty;
            }
            set
            {
                if (!string.IsNullOrWhiteSpace(value))
                    _ContractDate = DateTime.Parse(value);
            }
        }
        /// <summary> 
        /// 签订类型
        /// </summary> 
        public string SignType { get; set; }

        /// <summary> 
        /// 跟踪人员
        /// </summary> 
        public string TrackPepole { get; set; }

        /// <summary> 
        /// 备案
        /// </summary> 
        public Boolean IsReport { get; set; }

        /// <summary> 
        /// 失败原因
        /// </summary> 
        public string CauseFailure { get; set; }

        /// <summary> 
        /// 备注
        /// </summary> 
        public string Remark { get; set; }

        /// <summary> 
        /// 到期时间
        /// </summary> 
        private DateTime _EndTime { get; set; }

        /// <summary>
        /// 到期时间
        /// </summary>
        public string EndTime
        {
            get
            {
                if (null != _EndTime) return _EndTime.ToString("yyyy-MM-dd");
                return string.Empty;
            }
            set
            {
                if (!string.IsNullOrWhiteSpace(value))
                    _EndTime = DateTime.Parse(value);
            }
        }
        /// <summary> 
        /// 签订人员
        /// </summary> 
        public string ContractingOfficer { get; set; }

        /// <summary> 
        /// 数据插入时间
        /// </summary> 
        private DateTime _InsertTime { get; set; }
        /// <summary>
        /// 数据插入时间
        /// </summary>
        public string InsertTime
        {
            get
            {
                if (null != _InsertTime) return _InsertTime.ToString("yyyy-MM-dd");
                return string.Empty;
            }
            set
            {
                if (!string.IsNullOrWhiteSpace(value))
                    _InsertTime = DateTime.Parse(value);
            }
        }
        /// <summary>
        /// 最后跟踪时间
        /// </summary>
        private DateTime _Tm { get; set; }
        /// <summary>
        /// 最后跟踪时间
        /// </summary>
        public string Tm
        {
            get
            {
                if (null != _Tm) return _Tm.ToString("yyyy-MM-dd");
                return string.Empty;
            }
            set
            {
                if (!string.IsNullOrWhiteSpace(value))
                    _Tm = DateTime.Parse(value);
            }
        }
        /// <summary>
        /// 最后跟踪内容
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 主跟进组
        /// </summary>
        public string PrimaryTerritory { get; set; }
    }
}